package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Date: 2023-06-10
 * Time: 11:36
 */
public class Test {
    public static void main(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.display();

        myArrayList.remove(1);
        myArrayList.remove(2);
        myArrayList.remove(3);
        myArrayList.remove(4);


        myArrayList.display();

        /*try{
            myArrayList.add(1,99);
        }catch (ArithmeticException e){
            e.printStackTrace();
        }
        myArrayList.display();

        System.out.println("=======================");

        try{
            System.out.println(myArrayList.get(3));
        }catch (ArithmeticException e){
            e.printStackTrace();
        }*/
    }
}
